<template>
    <div class="m-main">
        <div class="m-container">
            <div class="m-login">
                <h2 class="m-title">会员注册</h2>
                <div class="m-under-line">
                </div>
                <van-form @submit="onSubmit">
                    <van-field
                            style="margin-bottom: 20px"
                            v-model="userName"
                            name="用户名"
                            label="用户名"
                            placeholder="用户名"
                            :rules="[{ required: true, message: '请填写用户名' }]"
                    />
                    <van-field
                            v-model="password"
                            type="password"
                            name="密码"
                            label="密码"
                            placeholder="密码"

                            :rules="[{ required: true, message: '请填写密码' }]"
                    />
                    <div style="margin: 16px;">
                        <van-button round block type="info" native-type="submit">立即注册</van-button>
                    </div>
                </van-form>
                <div class="m-text-right"><p>您已有账号？<router-link to="/login" class="m-a">请登录</router-link></p></div>

            </div>
        </div>
    </div>
</template>

<script>
    export default {
        name: "Register",
        data() {
            return {
                userName: '',
                password: ''
            }
        }
    }
</script>

<style scoped>
    .m-main {
        background:  url("./images/bg.jpg") no-repeat;
    }

    .m-container {
        height: 707px;
        width: calc(100% - 24px);
        padding: 30% 12px 0 12px;
        z-index: 99;
    }

    .m-login {
        margin: 0 auto;
    }

    .m-a {
        color: #25b4ed;
    }

    .m-title {
        text-align: center;
        color: #25b4ed;
        margin-bottom: 50px;
    }

    .m-under-line {
        height: 2px;
        background: #1baeae;
        margin: 30px 0;
    }

    .m-text-right {
        margin: 10px 0;
        text-align: right;
        color: white;
    }
</style>
